<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>SDL_gfx: I:/Sources/sdlgfx/SDL_rotozoom.c File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">SDL_gfx
   &#160;<span id="projectnumber">2.0.25</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">I:/Sources/sdlgfx/SDL_rotozoom.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_s_d_l__rotozoom_8h_source.html">SDL_rotozoom.h</a>&quot;</code><br/>
</div>
<p><a href="_s_d_l__rotozoom_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structt_color_r_g_b_a.html">tColorRGBA</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A 32 bit RGBA pixel.  <a href="structt_color_r_g_b_a.html#details">More...</a><br/></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structt_color_y.html">tColorY</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A 8bit Y/palette pixel.  <a href="structt_color_y.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr class="memitem:afa99ec4acc4ecb2dc3c2d05da15d0e3f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#afa99ec4acc4ecb2dc3c2d05da15d0e3f">MAX</a>(a, b)&#160;&#160;&#160;(((a) &gt; (b)) ? (a) : (b))</td></tr>
<tr class="memdesc:afa99ec4acc4ecb2dc3c2d05da15d0e3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns maximum of two numbers a and b.  <a href="#afa99ec4acc4ecb2dc3c2d05da15d0e3f"></a><br/></td></tr>
<tr class="memitem:a05a2601b7ea2906858ccc31b45fdc6eb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a05a2601b7ea2906858ccc31b45fdc6eb">GUARD_ROWS</a>&#160;&#160;&#160;(2)</td></tr>
<tr class="memdesc:a05a2601b7ea2906858ccc31b45fdc6eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of guard rows added to destination surfaces.  <a href="#a05a2601b7ea2906858ccc31b45fdc6eb"></a><br/></td></tr>
<tr class="memitem:a98a929bd64d660c1860c7b60b4fe5bd9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a98a929bd64d660c1860c7b60b4fe5bd9">VALUE_LIMIT</a>&#160;&#160;&#160;0.001</td></tr>
<tr class="memdesc:a98a929bd64d660c1860c7b60b4fe5bd9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lower limit of absolute zoom factor or rotation degrees.  <a href="#a98a929bd64d660c1860c7b60b4fe5bd9"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ac91ff95383d3a6c0df046a42e23baf04"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structt_color_r_g_b_a.html">tColorRGBA</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#ac91ff95383d3a6c0df046a42e23baf04">tColorRGBA</a></td></tr>
<tr class="memdesc:ac91ff95383d3a6c0df046a42e23baf04"><td class="mdescLeft">&#160;</td><td class="mdescRight">A 32 bit RGBA pixel.  <a href="#ac91ff95383d3a6c0df046a42e23baf04"></a><br/></td></tr>
<tr class="memitem:a9db27e25d1a6e93c64eb768007dcf3da"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structt_color_y.html">tColorY</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a9db27e25d1a6e93c64eb768007dcf3da">tColorY</a></td></tr>
<tr class="memdesc:a9db27e25d1a6e93c64eb768007dcf3da"><td class="mdescLeft">&#160;</td><td class="mdescRight">A 8bit Y/palette pixel.  <a href="#a9db27e25d1a6e93c64eb768007dcf3da"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:afe2a2e4dc6cc462c5fc98a2110b8e1ce"><td class="memItemLeft" align="right" valign="top">Uint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#afe2a2e4dc6cc462c5fc98a2110b8e1ce">_colorkey</a> (SDL_Surface *src)</td></tr>
<tr class="memdesc:afe2a2e4dc6cc462c5fc98a2110b8e1ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns colorkey info for a surface.  <a href="#afe2a2e4dc6cc462c5fc98a2110b8e1ce"></a><br/></td></tr>
<tr class="memitem:ac1bde824f44ae9a76930e9782b783512"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#ac1bde824f44ae9a76930e9782b783512">_shrinkSurfaceRGBA</a> (SDL_Surface *src, SDL_Surface *dst, int factorx, int factory)</td></tr>
<tr class="memdesc:ac1bde824f44ae9a76930e9782b783512"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal 32 bit integer-factor averaging Shrinker.  <a href="#ac1bde824f44ae9a76930e9782b783512"></a><br/></td></tr>
<tr class="memitem:aadb38a61ab6727e5fd621b63418399be"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#aadb38a61ab6727e5fd621b63418399be">_shrinkSurfaceY</a> (SDL_Surface *src, SDL_Surface *dst, int factorx, int factory)</td></tr>
<tr class="memdesc:aadb38a61ab6727e5fd621b63418399be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal 8 bit integer-factor averaging shrinker.  <a href="#aadb38a61ab6727e5fd621b63418399be"></a><br/></td></tr>
<tr class="memitem:a9898b12bb565c4075c2da4db4891fd81"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a9898b12bb565c4075c2da4db4891fd81">_zoomSurfaceRGBA</a> (SDL_Surface *src, SDL_Surface *dst, int flipx, int flipy, int smooth)</td></tr>
<tr class="memdesc:a9898b12bb565c4075c2da4db4891fd81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal 32 bit Zoomer with optional anti-aliasing by bilinear interpolation.  <a href="#a9898b12bb565c4075c2da4db4891fd81"></a><br/></td></tr>
<tr class="memitem:acfeb5a322cbb575f105f1762d9d21c29"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#acfeb5a322cbb575f105f1762d9d21c29">_zoomSurfaceY</a> (SDL_Surface *src, SDL_Surface *dst, int flipx, int flipy)</td></tr>
<tr class="memdesc:acfeb5a322cbb575f105f1762d9d21c29"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal 8 bit Zoomer without smoothing.  <a href="#acfeb5a322cbb575f105f1762d9d21c29"></a><br/></td></tr>
<tr class="memitem:aae634e7b5e6ec1622fec361ecbd0d1b7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#aae634e7b5e6ec1622fec361ecbd0d1b7">_transformSurfaceRGBA</a> (SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy, int smooth)</td></tr>
<tr class="memdesc:aae634e7b5e6ec1622fec361ecbd0d1b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal 32 bit rotozoomer with optional anti-aliasing.  <a href="#aae634e7b5e6ec1622fec361ecbd0d1b7"></a><br/></td></tr>
<tr class="memitem:a126e3b96b22cc18e78e33cc1f8eb6c3c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a126e3b96b22cc18e78e33cc1f8eb6c3c">transformSurfaceY</a> (SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy)</td></tr>
<tr class="memdesc:a126e3b96b22cc18e78e33cc1f8eb6c3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotates and zooms 8 bit palette/Y 'src' surface to 'dst' surface without smoothing.  <a href="#a126e3b96b22cc18e78e33cc1f8eb6c3c"></a><br/></td></tr>
<tr class="memitem:a77563d68634cb2624d4f2f0bcdc19e73"><td class="memItemLeft" align="right" valign="top">SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a77563d68634cb2624d4f2f0bcdc19e73">rotateSurface90Degrees</a> (SDL_Surface *src, int numClockwiseTurns)</td></tr>
<tr class="memdesc:a77563d68634cb2624d4f2f0bcdc19e73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotates a 32 bit surface in increments of 90 degrees.  <a href="#a77563d68634cb2624d4f2f0bcdc19e73"></a><br/></td></tr>
<tr class="memitem:af48638a298820d4d1dd24a13896963d8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#af48638a298820d4d1dd24a13896963d8">_rotozoomSurfaceSizeTrig</a> (int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight, double *canglezoom, double *sanglezoom)</td></tr>
<tr class="memdesc:af48638a298820d4d1dd24a13896963d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal target surface sizing function for rotozooms with trig result return.  <a href="#af48638a298820d4d1dd24a13896963d8"></a><br/></td></tr>
<tr class="memitem:aee64992d26c818d9975610754d5c929b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#aee64992d26c818d9975610754d5c929b">rotozoomSurfaceSizeXY</a> (int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight)</td></tr>
<tr class="memdesc:aee64992d26c818d9975610754d5c929b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size of the resulting target surface for a <a class="el" href="_s_d_l__rotozoom_8c.html#aab98b5b0da4ea468bacf47f7b85f0ee2" title="Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-...">rotozoomSurfaceXY()</a> call.  <a href="#aee64992d26c818d9975610754d5c929b"></a><br/></td></tr>
<tr class="memitem:a9886c783255edfd70a4974f8f3dd5a8c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a9886c783255edfd70a4974f8f3dd5a8c">rotozoomSurfaceSize</a> (int width, int height, double angle, double zoom, int *dstwidth, int *dstheight)</td></tr>
<tr class="memdesc:a9886c783255edfd70a4974f8f3dd5a8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size of the resulting target surface for a <a class="el" href="_s_d_l__rotozoom_8c.html#a5f64ed53eeee5f2667971c857698d1e5" title="Rotates and zooms a surface and optional anti-aliasing.">rotozoomSurface()</a> call.  <a href="#a9886c783255edfd70a4974f8f3dd5a8c"></a><br/></td></tr>
<tr class="memitem:a5f64ed53eeee5f2667971c857698d1e5"><td class="memItemLeft" align="right" valign="top">SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a5f64ed53eeee5f2667971c857698d1e5">rotozoomSurface</a> (SDL_Surface *src, double angle, double zoom, int smooth)</td></tr>
<tr class="memdesc:a5f64ed53eeee5f2667971c857698d1e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotates and zooms a surface and optional anti-aliasing.  <a href="#a5f64ed53eeee5f2667971c857698d1e5"></a><br/></td></tr>
<tr class="memitem:aab98b5b0da4ea468bacf47f7b85f0ee2"><td class="memItemLeft" align="right" valign="top">SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#aab98b5b0da4ea468bacf47f7b85f0ee2">rotozoomSurfaceXY</a> (SDL_Surface *src, double angle, double zoomx, double zoomy, int smooth)</td></tr>
<tr class="memdesc:aab98b5b0da4ea468bacf47f7b85f0ee2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing.  <a href="#aab98b5b0da4ea468bacf47f7b85f0ee2"></a><br/></td></tr>
<tr class="memitem:a8ba40859c1a977dae87488dd8be1bf9a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a8ba40859c1a977dae87488dd8be1bf9a">zoomSurfaceSize</a> (int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight)</td></tr>
<tr class="memdesc:a8ba40859c1a977dae87488dd8be1bf9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the size of the target surface for a <a class="el" href="_s_d_l__rotozoom_8c.html#abdd772b2f6b1f26134e4e90cda657a21" title="Zoom a surface by independent horizontal and vertical factors with optional smoothing.">zoomSurface()</a> call.  <a href="#a8ba40859c1a977dae87488dd8be1bf9a"></a><br/></td></tr>
<tr class="memitem:abdd772b2f6b1f26134e4e90cda657a21"><td class="memItemLeft" align="right" valign="top">SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#abdd772b2f6b1f26134e4e90cda657a21">zoomSurface</a> (SDL_Surface *src, double zoomx, double zoomy, int smooth)</td></tr>
<tr class="memdesc:abdd772b2f6b1f26134e4e90cda657a21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Zoom a surface by independent horizontal and vertical factors with optional smoothing.  <a href="#abdd772b2f6b1f26134e4e90cda657a21"></a><br/></td></tr>
<tr class="memitem:aad3bf0cd89cc39ff874ffa778fa1495d"><td class="memItemLeft" align="right" valign="top">SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#aad3bf0cd89cc39ff874ffa778fa1495d">shrinkSurface</a> (SDL_Surface *src, int factorx, int factory)</td></tr>
<tr class="memdesc:aad3bf0cd89cc39ff874ffa778fa1495d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shrink a surface by an integer ratio using averaging.  <a href="#aad3bf0cd89cc39ff874ffa778fa1495d"></a><br/></td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a05a2601b7ea2906858ccc31b45fdc6eb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="_s_d_l__rotozoom_8c.html#a05a2601b7ea2906858ccc31b45fdc6eb">GUARD_ROWS</a>&#160;&#160;&#160;(2)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Number of guard rows added to destination surfaces. </p>
<p>This is a simple but effective workaround for observed issues. These rows allocate extra memory and are then hidden from the surface. Rows are added to the end of destination surfaces when they are allocated. This catches any potential overflows which seem to happen with just the right src image dimensions and scale/rotation and can lead to a situation where the program can segfault. </p>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00073">73</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="afa99ec4acc4ecb2dc3c2d05da15d0e3f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="_s_d_l__rotozoom_8c.html#afa99ec4acc4ecb2dc3c2d05da15d0e3f">MAX</a></td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">b&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(((a) &gt; (b)) ? (a) : (b))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns maximum of two numbers a and b. </p>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00061">61</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a98a929bd64d660c1860c7b60b4fe5bd9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="_s_d_l__rotozoom_8c.html#a98a929bd64d660c1860c7b60b4fe5bd9">VALUE_LIMIT</a>&#160;&#160;&#160;0.001</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Lower limit of absolute zoom factor or rotation degrees. </p>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00078">78</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ac91ff95383d3a6c0df046a42e23baf04"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structt_color_r_g_b_a.html">tColorRGBA</a>  <a class="el" href="structt_color_r_g_b_a.html">tColorRGBA</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A 32 bit RGBA pixel. </p>

</div>
</div>
<a class="anchor" id="a9db27e25d1a6e93c64eb768007dcf3da"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structt_color_y.html">tColorY</a>  <a class="el" href="structt_color_y.html">tColorY</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A 8bit Y/palette pixel. </p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="afe2a2e4dc6cc462c5fc98a2110b8e1ce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Uint32 <a class="el" href="_s_d_l__rotozoom_8c.html#afe2a2e4dc6cc462c5fc98a2110b8e1ce">_colorkey</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns colorkey info for a surface. </p>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00083">83</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="af48638a298820d4d1dd24a13896963d8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="_s_d_l__rotozoom_8c.html#af48638a298820d4d1dd24a13896963d8">_rotozoomSurfaceSizeTrig</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstheight</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>canglezoom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>sanglezoom</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Internal target surface sizing function for rotozooms with trig result return. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">width</td><td>The source surface width. </td></tr>
    <tr><td class="paramname">height</td><td>The source surface height. </td></tr>
    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td class="paramname">zoomx</td><td>The horizontal scaling factor. </td></tr>
    <tr><td class="paramname">zoomy</td><td>The vertical scaling factor. </td></tr>
    <tr><td class="paramname">dstwidth</td><td>The calculated width of the destination surface. </td></tr>
    <tr><td class="paramname">dstheight</td><td>The calculated height of the destination surface. </td></tr>
    <tr><td class="paramname">canglezoom</td><td>The sine of the angle adjusted by the zoom factor. </td></tr>
    <tr><td class="paramname">sanglezoom</td><td>The cosine of the angle adjusted by the zoom factor. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00949">949</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="ac1bde824f44ae9a76930e9782b783512"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="_s_d_l__rotozoom_8c.html#ac1bde824f44ae9a76930e9782b783512">_shrinkSurfaceRGBA</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>factorx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>factory</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Internal 32 bit integer-factor averaging Shrinker. </p>
<p>Shrinks 32 bit RGBA/ABGR 'src' surface to 'dst' surface. Averages color and alpha values values of src pixels to calculate dst pixels. Assumes src and dst surfaces are of 32 bit depth. Assumes dst surface was allocated with the correct dimensions.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to shrink (input). </td></tr>
    <tr><td class="paramname">dst</td><td>The shrunken surface (output). </td></tr>
    <tr><td class="paramname">factorx</td><td>The horizontal shrinking ratio. </td></tr>
    <tr><td class="paramname">factory</td><td>The vertical shrinking ratio.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>0 for success or -1 for error. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00113">113</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="aadb38a61ab6727e5fd621b63418399be"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="_s_d_l__rotozoom_8c.html#aadb38a61ab6727e5fd621b63418399be">_shrinkSurfaceY</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>factorx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>factory</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Internal 8 bit integer-factor averaging shrinker. </p>
<p>Shrinks 8bit Y 'src' surface to 'dst' surface. Averages color (brightness) values values of src pixels to calculate dst pixels. Assumes src and dst surfaces are of 8 bit depth. Assumes dst surface was allocated with the correct dimensions.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to shrink (input). </td></tr>
    <tr><td class="paramname">dst</td><td>The shrunken surface (output). </td></tr>
    <tr><td class="paramname">factorx</td><td>The horizontal shrinking ratio. </td></tr>
    <tr><td class="paramname">factory</td><td>The vertical shrinking ratio.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>0 for success or -1 for error. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00202">202</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="aae634e7b5e6ec1622fec361ecbd0d1b7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="_s_d_l__rotozoom_8c.html#aae634e7b5e6ec1622fec361ecbd0d1b7">_transformSurfaceRGBA</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>isin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>icos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flipx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flipy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>smooth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Internal 32 bit rotozoomer with optional anti-aliasing. </p>
<p>Rotates and zooms 32 bit RGBA/ABGR 'src' surface to 'dst' surface based on the control parameters by scanning the destination surface and applying optionally anti-aliasing by bilinear interpolation. Assumes src and dst surfaces are of 32 bit depth. Assumes dst surface was allocated with the correct dimensions.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Source surface. </td></tr>
    <tr><td class="paramname">dst</td><td>Destination surface. </td></tr>
    <tr><td class="paramname">cx</td><td>Horizontal center coordinate. </td></tr>
    <tr><td class="paramname">cy</td><td>Vertical center coordinate. </td></tr>
    <tr><td class="paramname">isin</td><td>Integer version of sine of angle. </td></tr>
    <tr><td class="paramname">icos</td><td>Integer version of cosine of angle. </td></tr>
    <tr><td class="paramname">flipx</td><td>Flag indicating horizontal mirroring should be applied. </td></tr>
    <tr><td class="paramname">flipy</td><td>Flag indicating vertical mirroring should be applied. </td></tr>
    <tr><td class="paramname">smooth</td><td>Flag indicating anti-aliasing should be used. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00638">638</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a9898b12bb565c4075c2da4db4891fd81"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="_s_d_l__rotozoom_8c.html#a9898b12bb565c4075c2da4db4891fd81">_zoomSurfaceRGBA</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flipx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flipy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>smooth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Internal 32 bit Zoomer with optional anti-aliasing by bilinear interpolation. </p>
<p>Zooms 32 bit RGBA/ABGR 'src' surface to 'dst' surface. Assumes src and dst surfaces are of 32 bit depth. Assumes dst surface was allocated with the correct dimensions.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to zoom (input). </td></tr>
    <tr><td class="paramname">dst</td><td>The zoomed surface (output). </td></tr>
    <tr><td class="paramname">flipx</td><td>Flag indicating if the image should be horizontally flipped. </td></tr>
    <tr><td class="paramname">flipy</td><td>Flag indicating if the image should be vertically flipped. </td></tr>
    <tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>0 for success or -1 for error. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00286">286</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="acfeb5a322cbb575f105f1762d9d21c29"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="_s_d_l__rotozoom_8c.html#acfeb5a322cbb575f105f1762d9d21c29">_zoomSurfaceY</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flipx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flipy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Internal 8 bit Zoomer without smoothing. </p>
<p>Zooms 8bit palette/Y 'src' surface to 'dst' surface. Assumes src and dst surfaces are of 8 bit depth. Assumes dst surface was allocated with the correct dimensions.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to zoom (input). </td></tr>
    <tr><td class="paramname">dst</td><td>The zoomed surface (output). </td></tr>
    <tr><td class="paramname">flipx</td><td>Flag indicating if the image should be horizontally flipped. </td></tr>
    <tr><td class="paramname">flipy</td><td>Flag indicating if the image should be vertically flipped.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>0 for success or -1 for error. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00519">519</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a77563d68634cb2624d4f2f0bcdc19e73"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Surface* <a class="el" href="_s_d_l__rotozoom_8h.html#ac06e9fa4fce6a1dbae45462529be581e">rotateSurface90Degrees</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numClockwiseTurns</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rotates a 32 bit surface in increments of 90 degrees. </p>
<p>Specialized 90 degree rotator which rotates a 'src' surface in 90 degree increments clockwise returning a new surface. Faster than rotozoomer since not scanning or interpolation takes place. Input surface must be 32 bit. (code contributed by J. Schiller, improved by C. Allport and A. Schiffler)</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Source surface to rotate. </td></tr>
    <tr><td class="paramname">numClockwiseTurns</td><td>Number of clockwise 90 degree turns to apply to the source.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The new, rotated surface; or NULL for surfaces with incorrect input format. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00814">814</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a5f64ed53eeee5f2667971c857698d1e5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Surface* <a class="el" href="_s_d_l__rotozoom_8h.html#a3cb0c11d5edc929579c807dc7612348c">rotozoomSurface</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>smooth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rotates and zooms a surface and optional anti-aliasing. </p>
<p>Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees and 'zoom' a scaling factor. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to rotozoom. </td></tr>
    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td class="paramname">zoom</td><td>The scaling factor. </td></tr>
    <tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The new rotozoomed surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01030">1030</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a9886c783255edfd70a4974f8f3dd5a8c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="_s_d_l__rotozoom_8h.html#a3ca2316375d6faf4f19b26c2f1f14bbc">rotozoomSurfaceSize</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstheight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the size of the resulting target surface for a <a class="el" href="_s_d_l__rotozoom_8c.html#a5f64ed53eeee5f2667971c857698d1e5" title="Rotates and zooms a surface and optional anti-aliasing.">rotozoomSurface()</a> call. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">width</td><td>The source surface width. </td></tr>
    <tr><td class="paramname">height</td><td>The source surface height. </td></tr>
    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td class="paramname">zoom</td><td>The scaling factor. </td></tr>
    <tr><td class="paramname">dstwidth</td><td>The calculated width of the rotozoomed destination surface. </td></tr>
    <tr><td class="paramname">dstheight</td><td>The calculated height of the rotozoomed destination surface. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01008">1008</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="aee64992d26c818d9975610754d5c929b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="_s_d_l__rotozoom_8h.html#a612334fa642f672af953f544da6245d0">rotozoomSurfaceSizeXY</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstheight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the size of the resulting target surface for a <a class="el" href="_s_d_l__rotozoom_8c.html#aab98b5b0da4ea468bacf47f7b85f0ee2" title="Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-...">rotozoomSurfaceXY()</a> call. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">width</td><td>The source surface width. </td></tr>
    <tr><td class="paramname">height</td><td>The source surface height. </td></tr>
    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td class="paramname">zoomx</td><td>The horizontal scaling factor. </td></tr>
    <tr><td class="paramname">zoomy</td><td>The vertical scaling factor. </td></tr>
    <tr><td class="paramname">dstwidth</td><td>The calculated width of the rotozoomed destination surface. </td></tr>
    <tr><td class="paramname">dstheight</td><td>The calculated height of the rotozoomed destination surface. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00991">991</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="aab98b5b0da4ea468bacf47f7b85f0ee2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Surface* <a class="el" href="_s_d_l__rotozoom_8h.html#a454d4234a45eab6ec238a40cc44051d4">rotozoomSurfaceXY</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>smooth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing. </p>
<p>Rotates and zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees, 'zoomx and 'zoomy' scaling factors. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to rotozoom. </td></tr>
    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td class="paramname">zoomx</td><td>The horizontal scaling factor. </td></tr>
    <tr><td class="paramname">zoomy</td><td>The vertical scaling factor. </td></tr>
    <tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The new rotozoomed surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01051">1051</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="aad3bf0cd89cc39ff874ffa778fa1495d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Surface* <a class="el" href="_s_d_l__rotozoom_8h.html#a7a7ac2cc0d79d282b5a4c76143b7e7a9">shrinkSurface</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>factorx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>factory</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Shrink a surface by an integer ratio using averaging. </p>
<p>Shrinks a 32bit or 8bit 'src' surface to a newly created 'dst' surface. 'factorx' and 'factory' are the shrinking ratios (i.e. 2=1/2 the size, 3=1/3 the size, etc.) The destination surface is antialiased by averaging the source box RGBA or Y information. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. The input surface is not modified. The output surface is newly allocated.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to shrink. </td></tr>
    <tr><td class="paramname">factorx</td><td>The horizontal shrinking ratio. </td></tr>
    <tr><td class="paramname">factory</td><td>The vertical shrinking ratio.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The new, shrunken surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01548">1548</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a126e3b96b22cc18e78e33cc1f8eb6c3c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="_s_d_l__rotozoom_8c.html#a126e3b96b22cc18e78e33cc1f8eb6c3c">transformSurfaceY</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>isin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>icos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flipx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flipy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rotates and zooms 8 bit palette/Y 'src' surface to 'dst' surface without smoothing. </p>
<p>Rotates and zooms 8 bit RGBA/ABGR 'src' surface to 'dst' surface based on the control parameters by scanning the destination surface. Assumes src and dst surfaces are of 8 bit depth. Assumes dst surface was allocated with the correct dimensions.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Source surface. </td></tr>
    <tr><td class="paramname">dst</td><td>Destination surface. </td></tr>
    <tr><td class="paramname">cx</td><td>Horizontal center coordinate. </td></tr>
    <tr><td class="paramname">cy</td><td>Vertical center coordinate. </td></tr>
    <tr><td class="paramname">isin</td><td>Integer version of sine of angle. </td></tr>
    <tr><td class="paramname">icos</td><td>Integer version of cosine of angle. </td></tr>
    <tr><td class="paramname">flipx</td><td>Flag indicating horizontal mirroring should be applied. </td></tr>
    <tr><td class="paramname">flipy</td><td>Flag indicating vertical mirroring should be applied. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00755">755</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="abdd772b2f6b1f26134e4e90cda657a21"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Surface* <a class="el" href="_s_d_l__rotozoom_8h.html#a06c8108f8fe8de77cf841c176ee64850">zoomSurface</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>smooth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Zoom a surface by independent horizontal and vertical factors with optional smoothing. </p>
<p>Zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is on then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. If zoom factors are negative, the image is flipped on the axes.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The surface to zoom. </td></tr>
    <tr><td class="paramname">zoomx</td><td>The horizontal zoom factor. </td></tr>
    <tr><td class="paramname">zoomy</td><td>The vertical zoom factor. </td></tr>
    <tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The new, zoomed surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01392">1392</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a8ba40859c1a977dae87488dd8be1bf9a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="_s_d_l__rotozoom_8h.html#a7927e415d87ea7856794cd4cc77e0a25">zoomSurfaceSize</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dstheight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Calculates the size of the target surface for a <a class="el" href="_s_d_l__rotozoom_8c.html#abdd772b2f6b1f26134e4e90cda657a21" title="Zoom a surface by independent horizontal and vertical factors with optional smoothing.">zoomSurface()</a> call. </p>
<p>The minimum size of the target surface is 1. The input factors can be positive or negative.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">width</td><td>The width of the source surface to zoom. </td></tr>
    <tr><td class="paramname">height</td><td>The height of the source surface to zoom. </td></tr>
    <tr><td class="paramname">zoomx</td><td>The horizontal zoom factor. </td></tr>
    <tr><td class="paramname">zoomy</td><td>The vertical zoom factor. </td></tr>
    <tr><td class="paramname">dstwidth</td><td>Pointer to an integer to store the calculated width of the zoomed target surface. </td></tr>
    <tr><td class="paramname">dstheight</td><td>Pointer to an integer to store the calculated height of the zoomed target surface. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01342">1342</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
